Reading beside the lines: Using indentation to rank revisions by complexity

نویسندگان

  • Abram Hindle
  • Michael W. Godfrey
  • Richard C. Holt
چکیده

Maintainers often face the daunting task of wading through a collection of both new and old revisions, trying to ferret out those that warrant detailed inspection. Perhaps the most obvious way to rank revisions is by size in terms of lines of code (LOC); this technique has the advantage of being both simple and fast. However, it is well known that the vast majority of revisions are quite small, and so we would like a way of distinguishing between simple and complex changes of the same size. Classical complexity metrics, such as Halstead’s and McCabe’s, could be used but they are hard to apply to code fragments written in multiple programming languages. We propose using the statistical moments of indentation as a lightweight, language independent, revision/diff friendly metric as a proxy for classical complexity metrics. We have evaluated our approach against the entire CVS histories of the 278 of the most popular and most active SourceForge projects. We found that our results are linearly correlated and rank-correlated with traditional measures of complexity, suggesting that measuring indentation is a cheap and accurate proxy for code complexity of revisions. Thus ranking revisions by the standard deviation and summation of indentation yields results that are very similar to ranking revisions by complexity.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Reading Beside the Lines: Indentation as a Proxy for Complexity Metrics

Maintainers face the daunting task of wading through a collection of both new and old revisions, trying to ferret out revisions which warrant personal inspection. One can rank revisions by size/lines of code (LOC), but often, due to the distribution of the size of changes, revisions will be of similar size. If we can’t rank revisions by LOC perhaps we can rank by Halstead’s and McCabe’s complex...

متن کامل

The effects of teaching English alphabet with and without initial introduction of letter names on Iranian grade seven students' reading speed

One of the most important steps in teaching English is teaching its alphabet to the learners. Implementing the best method will highly help teachers to achieve acceptable results in helping students to read better and faster. Two basic methods are frequently used by Iranian educators. Some start by the name of the letters and introduce the sounds that they symbolize later, while others are thos...

متن کامل

کتابخانه‌های عمومی و سرانه مطالعه

Purpose: This article is an attempt to determine the share of two types of readings (profession-oriented reading and free reading) which are performed in public libraries. It also tries to show the types of library divisions (circulation, membership, collection, area and library clients) which explain the mentioned reading types. Method: In the present research, which is an applied research w...

متن کامل

Directed Reading-Thinking Activity and Reading Comprehension

Reading comprehension is one of the essential skills for learning in every language and in Iranian educational system, there seems a need to make some revisions in teaching reading comprehension. In an attempt to address this problem, this research set out to utilize Directed Reading –Thinking Activity (coined by Stauffer, 1969) as a teaching comprehension model which was expected to enhance st...

متن کامل

Evaluation of Effects of Gradual Increase Length and Complexity of Utterance (GILCU) Treatment Method on the Reduction of Dysfluency in School-Aged Children with Stuttering

Objectives: The Gradual Increase Length and Complexity of Utterance (GILCU) therapy method is a form of operant conditioning. This is a precise and controlled treatment that is done in 54 steps in 3 speech situations consisting of monologue, reading, and conversation. This study aimed at examining the effects of GILCU treatment method on the reduction of speech dysfluency of scho...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:
  • Sci. Comput. Program.

دوره 74  شماره 

صفحات  -

تاریخ انتشار 2009